const image = function(file) {
    const isJpgOrPng = file.type === 'image/jpeg' || file.type === 'image/png';

    if (!isJpgOrPng) {
        return false
        // this.$message.error('你上传的不是图片');
    }else{
        return true
    }

};
const pdf = function(file) {
    const isPdf = file.type === 'application/pdf'
    if (!isPdf) {
        console.log(1111);
        
        return false
        // this.$message.error('你上传的不是PDF');
    }else{
        return true
    }
}
const pageNum=function(val){
    if(val==0){
     return 1
    }else{
      return val
    }
  }
export default { image,pdf,pageNum }
